package com.hfh.Thread;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class ThirdThread implements Callable<String> {
    public static void main(String[] args) {
        FutureTask<String> task = new FutureTask<>(new ThirdThread());
        Thread thread = new Thread(task);
        thread.start();

    }
    @Override
    public String call() throws Exception {
        System.out.println("线程创建第三种方式");
        return "线程创建第三种方式";
    }
}
